/**
 * Applikationsutveckling i Java, 5DV135
 * HT12
 * Project
 *
 * File: Bricks.java
 * Description: An abstract class for implementing for
 * 				example landscape bricks in a game
 * Date: 18 december 2012
 *
 * cs-user: dv11mgr
 * @author Maria Gramner
 */
package nullInvader.Engine;
import java.awt.Image;


abstract public class Bricks implements Field {

    private boolean movable;

    /**
     * Constructor method, sets the image for the brick
     * and also whether or not it is possible to walk on it
     * @param movable boolean
     */
    public Bricks(boolean movable){
        this.movable = movable;
        setIcon();
    }


    /**
     * Method to check if it is possible to move on the object
     * @return boolean
     */
    public boolean isMovable (){
        return movable;
    }


    /**
     * Abstract method to get the image for the brick
     * @return Image
     */
    public abstract Image getIcon();


    /**
     * Abstract method to set the correct image on the class
     * extending Bricks
     */
    protected abstract void setIcon();


    /**
     * Abstract method for setting an effect on the unit
     * currently on the brick
     * @param unit Unit
     */
    public abstract void landOn(Unit unit);


    /**
     * Abstract method for a possible effect that may
     * occur when the brick is clicked on
     */
    public abstract void wasClicked();
}
